from django import forms


class EditForm(forms.Form):
    title = forms.CharField(
        max_length=30,
        widget=forms.TextInput(
            attrs={
                'id': 'title',
                'name': 'title',
                'class': 'title',
                'placeholder': '请输入文章标题'
            }
        )
    )
    tags = forms.CharField(
        max_length=200,
        widget=forms.TextInput(
            attrs={
                'id': 'tags',
                'name': 'tags',
                'placeholder': '请输入文章tags，各个tag之间以分号|分隔，最多设置5个tag！！！'
            }
        )
    )
    abstract = forms.CharField(
        max_length=200,
        widget=forms.Textarea(
            # max_length=200,
            attrs={
                'id': 'abstract',
                'placeholder': '请输入文章摘要'
            }
        )
    )
    content = forms.CharField(
        max_length=5000,
        widget=forms.Textarea(
            attrs={
                'id': 'input',
                'class': 'input'
            }
        )
    )


class ArticleDetailForm(forms.Form):
    comment = forms.CharField(
        max_length=200,
        widget=forms.Textarea(
            attrs={
                'id': 'comment',
                'placeholder': '说7不说8，文明你我它'
            }
        )
    )
